package lab;

import java.awt.*;
import javax.swing.*;

public class MainFrame extends JFrame {

    NorthPanel northPanel = new NorthPanel();
    EastPanel eastPanel = new EastPanel();
    Cards cards = new Cards(eastPanel);
    SouthPanel southPanel = new SouthPanel(this.cards);
    WestPanel westPanel = new WestPanel(this.cards);

    public MainFrame() {
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());
        contentPane.add(northPanel, BorderLayout.NORTH);
        contentPane.add(cards.cardPanel, BorderLayout.CENTER);
        contentPane.add(southPanel, BorderLayout.SOUTH);
        contentPane.add(westPanel, BorderLayout.WEST);
        contentPane.add(eastPanel, BorderLayout.EAST);
        eastPanel.setLayout(new BoxLayout(eastPanel, BoxLayout.Y_AXIS));
        westPanel.setLayout(new BoxLayout(westPanel, BoxLayout.Y_AXIS));
        westPanel.setPreferredSize(new Dimension(200, super.getMaximumSize().height));
        eastPanel.setPreferredSize(new Dimension(150, super.getMaximumSize().height));
        westPanel.setMaximumSize(eastPanel.getPreferredSize());
        eastPanel.setMaximumSize(eastPanel.getPreferredSize());
        
        setTitle("Hybris");
        setSize(1000, 600);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);
    }
}
